package cn.school.workflow.service;

import cn.school.workflow.vo.LeaveApplyVO;
import cn.school.workflow.vo.WorkFlowVO;
import com.baomidou.mybatisplus.core.metadata.IPage;

import java.util.List;
import java.util.Map;

public interface LeaveApplyService {
    /**
     * 分页查询请假申请单
     * @param vo
     * @return
     */
    IPage<LeaveApplyVO> findLeaveApplyPageList(LeaveApplyVO vo);

    /**
     * 取消申请
     * @param vo
     * @return
     */
    boolean cancelLeaveApply(WorkFlowVO vo);

    /**
     * 创建请假申请
     * @param vo
     * @return
     */
    int createLeaveApply(LeaveApplyVO vo);

    /**
     * 根据ID查询请假申请详情
     * @param id
     * @return
     */
    LeaveApplyVO findLeaveApplyDetail(Long id);
    
    /**
     * 分组统计信息：按天，最后30天的人数（不含当天）
     *
     * @throws
     * @author fangjin.tao
     * @updateTime 2022/12/12 12:47
     * @return: java.util.Map<java.lang.String, java.util.List < java.lang.Object>>
     */
    Map<String, List<Object>> leaveApplyLastOneMonthGroup();
}
